package com.jinbm.common;

/**
 * 返回结果枚举
 *
 * @author Jinbm
 * @date 2024/7/8
 * @since 1.0
 */
public enum ResultEnum {

    SUCCESS(200, "操作成功"),
    FAIL(500, "操作失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    NOTFOUND(404, "请求地址不存在"),
    PARAM_ERROR(400, "参数错误"),
    REQUEST_TIMEOUT(408, "请求超时"),
    SERVER_ERROR(500, "服务器内部错误"),
    BUSINESS_ERROR(560, "业务处理失败"),
    UNKNOWN_ERROR(561, "未知错误");

    public Integer code;
    public String msg;

    ResultEnum(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }

}
